    <div id="breadcrumbs"><?php echo $this->Html->link('Home', array('controller' => 'contents', 'action' => 'view', 'home')); ?> > <?php echo $this->Html->link('List Resources', array('controller'=>'Resources', 'action'=>'index'));?> > <?php echo $resource['Resource']['res_name']?> 
</div>

<?php if($this->Session->read('Auth.User')){ ?>
<?php if ($this->Session->read('Auth.User.role_id') == 1 || $this->Session->read('Auth.User.role_id') == 2) { ?>
<div class="resources view">
<?php } ?>
<h2><?php  echo __('Resource'); ?></h2>
        <table>
            <tr>
                <th>
                    <?php echo __('Resource Name'); ?>
                </th>
                <td>
                    <?php echo h($resource['Resource']['res_name']); ?>
                </td>
            </tr>
            <tr>
                <th>
                    <?php echo __('Description'); ?>
                </th>
                <td>
                    <?php echo ($resource['Resource']['res_desc']); ?>
                </td>
            </tr>
            <tr>
                <th>
                    <?php echo __('Content'); ?>
                </th>
                <td>
                    <?php echo ($resource['Resource']['content']); ?>
                </td>
            </tr>
            <tr>
                <th>
                    <?php echo __('Catagory'); ?>
                </th>
                <td>
                    <?php echo $this->Html->link($resource['Catagory']['cat_name'], array('controller' => 'catagories', 'action' => 'view', $resource['Catagory']['cat_id'])); ?>
                </td>
            </tr>
            <tr>
                <th>
                    <?php echo __('Questionnaire'); ?>
                </th>
                <td>
                    <?php echo $this->Html->link($resource['Questionnaire']['qName'], array('controller' => 'questionnaires', 'action' => 'view', $resource['Questionnaire']['q_id'])); ?>
                </td>
            </tr>
	</table>

 <?php if($this->Session->read('Auth.User.role_id')==1 || $this->Session->read('Auth.User.role_id')==2){?>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Edit Resource'), array('action' => 'edit', $resource['Resource']['res_id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Delete Resource'), array('action' => 'delete', $resource['Resource']['res_id']), null, __('Are you sure you want to delete # %s?', $resource['Resource']['res_id'])); ?> </li>
	</ul>
</div>
 <?php }
 
 }else {
    echo $resource['Resource']['content'];
} ?>

